package cn.luoshaocheng.system.service.impl;


import cn.luoshaocheng.basic.service.impl.BaseServiceImpl;
import cn.luoshaocheng.system.domain.Systemdictionarytype;
import cn.luoshaocheng.system.mapper.SystemdictionarydetailMapper;
import cn.luoshaocheng.system.mapper.SystemdictionarytypeMapper;
import cn.luoshaocheng.system.service.ISystemdictionarytypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
//只读，事务传播机制=SUPPORTS，有我就用，没有事务就不用
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
public class SystemdictionarytypeServiceImpl extends BaseServiceImpl<Systemdictionarytype> implements ISystemdictionarytypeService {

    @Autowired
    private SystemdictionarydetailMapper systemdictionarydetailMapper;

    @Autowired
    private SystemdictionarytypeMapper systemdictionarytypeMapper;

    @Override
    public void delete(Long id) {
        systemdictionarydetailMapper.del(id);
        systemdictionarytypeMapper.remove(id);
    }

    @Override
    public void patchDel(List<Long> ids) {
        systemdictionarydetailMapper.patchDelele(ids);
        systemdictionarytypeMapper.patchDel(ids);
    }
}

